package com.g2room.tools.mybatisTools.to;

import java.io.Serializable;
import java.util.List;

public class XmlMapper implements Comparable<XmlMapper>, Serializable {
	private static final long serialVersionUID = -2105185147301661373L;
	// 表名
	private String tableName;
	// xml mapper配置文件名称
	private String xmlName;
	// java mapper类名称
	private String javaName;
	// Service引入的Mapper文件包路径
	private String pkgMapper;
	// Mapper文件包路径
	private String pkgMapperName;
	// Service文件包路径
	private String pkgServiceName;
	// ID字段，这里写死为：${id}
	private String idField;
	// po类名称，全路径
	private String poName;
	// po类别名，PO类首字母小写
	private String alias;
	// ResultMap的名称：alias+map
	private String mapName;
	
	private List<Field> fields;

	public String getPkgMapper() {
		return pkgMapper;
	}

	public void setPkgMapper(String pkgMapper) {
		this.pkgMapper = pkgMapper;
	}

	public String getPkgMapperName() {
		return pkgMapperName;
	}

	public void setPkgMapperName(String pkgMapperName) {
		this.pkgMapperName = pkgMapperName;
	}

	public String getPkgServiceName() {
		return pkgServiceName;
	}

	public void setPkgServiceName(String pkgServiceName) {
		this.pkgServiceName = pkgServiceName;
	}

	public String getJavaName() {
		return javaName;
	}

	public void setJavaName(String javaName) {
		this.javaName = javaName;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getIdField() {
		return idField;
	}

	public void setIdField(String idField) {
		this.idField = idField;
	}

	public String getPoName() {
		return poName;
	}

	public void setPoName(String poName) {
		this.poName = poName;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getMapName() {
		return mapName;
	}

	public void setMapName(String mapName) {
		this.mapName = mapName;
	}

	public List<Field> getFields() {
		return fields;
	}

	public void setFields(List<Field> fields) {
		this.fields = fields;
	}

	public String getXmlName() {
		return xmlName;
	}

	public void setXmlName(String xmlName) {
		this.xmlName = xmlName;
	}
	@Override
	public int compareTo(XmlMapper other) {
		if (other == null) return 1;
		return this.getTableName().compareTo(other.getTableName());
	}
}
